<?php

class Agilet_Bootstrap{
	public function initDb() {

		$db = new Zend_Db_Adapter_Mysqli( array('dbname' => DB_NAME, 'username' => DB_USER, 'password' => DB_PASSWORD));
		Zend_Db_Table_Abstract::setDefaultAdapter($db);
	}
	
	public function bootstrap(){
		$this->initDb();
		$this->initSite();
		$this->initView();
	}
	
	public function initTheme(){
		
	}
	
	public function initLayout(){
		
	}
	
	public function initSite(){
		$chanel = 'website';
		
		if(!defined('APP_PATH')){
			define('APP_PATH',ROOT_PATH. '/'. $chanel);
			define('MODULE_PATH',APP_PATH . '/modules');
		}
	}
	
	public function initView(){
		$view =  new Zend_View;
		
		Zend_Registry::set('Zend_View', $view);
	}
}
